//升级软件

import {updateAppUrl} from '../../config';
import {get,showToast} from './index';

export function update_app(){
	get(updateAppUrl, {
		version: plus.runtime.version
	})
	.then((res)=>{
		if(res.code==0){
			//if()
			uni.showModal({
				title: '更新提示',
				content: res.data.note,
				success(res1) {
					if(res1.confirm){
						plus.runtime.openURL(res.data.url)
					}
				}
			})
		}
	});
}